package com.yjd.msg.comm.core.service;

import com.yjd.msg.comm.core.model.MnsMessage;
import com.yjd.msg.comm.enums.MsgOrderServiceEnum;
import com.yjd.msg.comm.enums.MsgTypeEnum;

/**
 * Created by yjd-wap on 2018/1/22.
 */
public interface IMnsDisposeService {

    /**
     * 创建一个mns消息对象
     * @param ref_id
     * @param msgTypeEnum
     * @param message
     * @return
     * @throws Exception
     */
    public MnsMessage create(String ref_id, MsgTypeEnum msgTypeEnum, MsgOrderServiceEnum msgOrderServiceEnum, String message) throws Exception;


    /**
     * 获取mns消息,如果不存在则为空
     */
    public boolean verify(Long msgId,String orderServiceName) throws Exception;


    /**
     * 是否已经处理完成
     * @param message
     * @return
     * @throws Exception
     */
    public boolean isFinished(MnsMessage message) throws Exception;

    /**
     * 处理完成,更新消息
     * @param message
     * @throws Exception
     */
    public void finished(MnsMessage message) throws Exception;
}
